<template>
  <div id="fuyong">
      ziziziziziziziziziizizi---{{xiaoming}}
      <button @click="fun()">向父组件传值</button>
  </div>
</template>

<script>
export default {
    props:["xiaoming"],
    data(){
        return{
        zitext:"我是子组件的数据"
        }
    },
    methods:{
        fun(){
            this.$emit("xiaoming",this.zitext)
        }
    }
}
</script>

<style  scoped>


</style>
